<template>

<!--  :theme-overrides="themeOverrides"-->
  <n-config-provider
    :date-locale="dateZhCN"
    :locale="zhCN"
    :dialog-props="dialogProps"
    :message-props="messageProps"
    class="w-full h-full"
  >
    <div class="main-content w-full h-full">
      <router-view />
    </div>
  </n-config-provider>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { dateZhCN, zhCN } from 'naive-ui'
// 全局主题配置
const themeOverrides = {
  common: {
    baseColor: '#faf3e0',
    primaryColor: '#d4b595',
    primaryColorHover: '#c4a17d',
    bodyColor: '#faf1e2'
  },
  Card: {
    color: '#fafafa'
  },
  Layout: {
    color: '#faf3e0',
    headerColor: '#fff5e6',
    footerColor: '#fff5e6'
  }
}

// 对话框全局配置
const dialogProps = {
  maskClosable: false, // 点击遮罩层不关闭
  draggable: true,    // 可拖动
}

// 消息提示全局配置
const messageProps = {
  duration: 10000,     // 显示时长
  keepAliveOnHover: true,  // 鼠标悬停时保持显示
  max: 3,            // 同时显示的最大数量
}
</script>

<style scoped>
.main-content{
  background-color: #f1f1f6;
}
</style>
